package com.gxuwz.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.gxuwz.core.dao.impl.BaseDaoImpl;
import com.gxuwz.pojo.Form;
import com.gxuwz.pojo.Topic;

@Repository("topicDao")
public class TopicDao extends BaseDaoImpl<Topic> {
	@SuppressWarnings("unchecked")
	public List<Topic> findByProperty(String property, String value) {
		StringBuffer hql = new StringBuffer("from Topic where ");
		hql.append(property);
		hql.append(" = '");
		hql.append(value);
		hql.append("' ");
		return (List<Topic>) getHibernateTemplate().find(hql.toString());
	}
}
